package com.bright.ghj.overt.repository.primary;

import com.bright.ghj.overt.pojo.po.primary.FileListDFLZ;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @author Tz
 * @date 2024/01/22 15:03
 * @Description 上传廉政报表配置类的 Repository
 */
@SuppressWarnings("All")
public interface FileListDFLZRepository extends JpaRepository<FileListDFLZ, Integer>, JpaSpecificationExecutor<FileListDFLZ> {

    /**
     * 根据账套类型查询账套需要上传廉政平台的报表
     *
     * @param ztTypeId 账套类型
     * @return         返回需要上传廉政的配置报表信息列表
     */
    @Query("from FileListDFLZ where ztTypeId = :ztTypeId and visible = 1")
    List<FileListDFLZ> findCollectToGovernmentTableByZtTypeId(@Param("ztTypeId") Integer ztTypeId);
}
